﻿using System;

namespace Spencen.Mobile.Markup.Extensions
{
    public class StaticResourceMarkupExtension : IMarkupExtension
    {
        public StaticResourceMarkupExtension()
        {
        }

        #region IMarkupExtension Members

        public string ExtensionName
        {
            get { return "StaticResource"; }
        }

        public object Resolve( XamlNode context, Type expectedType, string args )
        {
            var keyName = args;
            return new StaticResource( keyName );
        }

        #endregion
    }
}
